{extend name='../../admin/view/main'}

{block name="button"}

{if sysconf('service.ticket_push_date')}
<span class='layui-btn layui-btn-sm layui-btn-disabled color-blue'>TICKET TIME {:sysconf('service.ticket_push_date')}</span>
{/if}

{if auth("edit")}
<button data-modal="{:url('edit')}" class='layui-btn layui-btn-sm layui-btn-primary'>配置开放平台</button>
{/if}

{/block}

{block name="content"}

<div class="think-box-shadow border-0 margin-bottom-20 sub-span-blue">
    建议安装 <span>YAR</span> 扩展并使用 <span>YAR</span> 进行接口通信，未安装 <span>YAR</span> 扩展时默认使用 <span>JsonRpc</span> 组件通信！
</div>

<div class="think-box-shadow padding-top-30 padding-right-40 padding-left-40">
    <div class="layui-row layui-col-space24">
        <div class="layui-col-md6">
            <div class="layui-form-item">
                <span class="color-green font-w7">开放平台服务</span>
                <span class="color-desc margin-left-5">AppId</span>
                <label class="relative block">
                    <input disabled class="layui-input layui-bg-gray" value="{:sysconf('service.component_appid')}">
                    <a data-copy="{:sysconf('service.component_appid')}" class="fa fa-copy input-right-icon"></a>
                </label>
                <p class="help-block">开放平台服务 AppId，需要在微信开放平台获取</p>
            </div>
            <div class="layui-form-item">
                <span class="color-green font-w7">开放平台服务</span>
                <span class="color-desc margin-left-5">AppSecret</span>
                <label class="relative block">
                    <input disabled class="layui-input layui-bg-gray" value="{:sysconf('service.component_appsecret')}">
                    <a data-copy="{:sysconf('service.component_appsecret')}" class="fa fa-copy input-right-icon"></a>
                </label>
                <p class="help-block">开放平台服务 AppSecret，需要在微信开放平台获取</p>
            </div>
            <div class="layui-form-item">
                <span class="color-green font-w7">开放平台消息校验</span>
                <span class="color-desc margin-left-5">Token</span>
                <label class="relative block">
                    <input disabled class="layui-input layui-bg-gray" value="{:sysconf('service.component_token')}">
                    <a data-copy="{:sysconf('service.component_token')}" class="fa fa-copy input-right-icon"></a>
                </label>
                <p class="help-block">开发者在代替微信接收到消息时，用此 Token 来校验消息</p>
            </div>
            <div class="layui-form-item">
                <span class="color-green font-w7">开放平台消息加解密</span>
                <span class="color-desc margin-left-5">AesKey</span>
                <label class="relative block">
                    <input disabled class="layui-input layui-bg-gray" value="{:sysconf('service.component_encodingaeskey')}">
                    <a data-copy="{:sysconf('service.component_encodingaeskey')}" class="fa fa-copy input-right-icon"></a>
                </label>
                <p class="help-block">在代替微信收发消息时使用，必须是长度为43位字母和数字组合的字符串</p>
            </div>
            <div class="layui-form-item">
                <span class="color-green font-w7">授权白名单IP地址</span>
                <span class="color-desc margin-left-5">ClientIp</span>
                <label class="relative block">
                    <input disabled class="layui-input layui-bg-gray" value="{$geoip|default=''}">
                    <a data-copy="{$geoip|default=''}" class="fa fa-copy input-right-icon"></a>
                </label>
                <p class="help-block">需要在开放平台配置此IP地址后才能调用开放平台的接口哦</p>
            </div>
        </div>
        <div class="layui-col-md6">
            <div class="layui-form-item">
                <p class="color-green font-w7">授权发起页域名</p>
                <label class="relative block">
                    <input disabled class="layui-input layui-bg-gray" value="{:request()->host()}">
                    <a data-copy="{:request()->host()}" class="fa fa-copy input-right-icon"></a>
                </label>
                <p class="help-block">从本域名跳转到登录授权页才可以完成登录授权，无需填写域名协议前缀</p>
            </div>
            <div class="layui-form-item">
                <span class="color-green font-w7">授权事件接收地址</span>
                <label class="relative block">
                    <input disabled class="layui-input layui-bg-gray" value="{:url('@service/api.push/ticket',[],false,true)}">
                    <a data-copy="{:url('@service/api.push/ticket',[],false,true)}" class="fa fa-copy input-right-icon"></a>
                </label>
                <p class="help-block">用于接收取消授权通知、授权成功通知、授权更新通知、接收 TICKET 凭据</p>
            </div>
            <div class="layui-form-item">
                <span class="color-green font-w7">微信消息与事件接收</span>
                <label class="relative block">
                    <input disabled class="layui-input layui-bg-gray" value="{:url('@service/api.push/notify/appid/\$APPID\$',[],false,true)}">
                    <a data-copy="{:url('@service/api.push/notify/appid/\$APPID\$',[],false,true)}" class="fa fa-copy input-right-icon"></a>
                </label>
                <p class="help-block">通过该 URL 接收微信消息和事件推送，$APPID$ 将被替换为微信 AppId</p>
            </div>
            <div class="layui-form-item">
                <p class="color-green font-w7">客户端系统 Yar 模块接口</p>
                <label class="relative block"><input disabled class="layui-input layui-bg-gray" value="{:url('@service/api.client/yar',[],false,true)}?token=TOKEN"></label>
                <p class="help-block">客户端 Yar 接口，TOKEN 包含 class appid time nostr sign 的加密内容</p>
            </div>
            <div class="layui-form-item layui-hide">
                <p class="color-green font-w7">客户端系统 Soap 模块接口</p>
                <label class="relative block"><input disabled class="layui-input layui-bg-gray" value="{:url('@service/api.client/soap',[],false,true)}?token=TOKEN"></label>
                <p class="help-block">客户端 Soap 接口，TOKEN 包含 class appid time nostr sign 的加密内容</p>
            </div>
            <div class="layui-form-item">
                <p class="color-green font-w7">客户端系统 JsonRpc 模块接口</p>
                <label class="relative block"><input disabled class="layui-input layui-bg-gray" value="{:url('@service/api.client/jsonrpc',[],false,true)}?token=TOKEN"></label>
                <p class="help-block">客户端 JsonRpc 接口，TOKEN 包含 class appid time nostr sign 的加密内容</p>
            </div>
        </div>
    </div>
</div>

{/block}